package cn.ming.wfchat.app.me.activity.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cn.ming.wfchat.R;
import cn.ming.wfchat.app.moment.third.beans.BuddyBean;
import cn.ming.wfchat.app.utils.ImageLoaderUtil;

public class BuddyListAdapter extends BaseQuickAdapter<BuddyBean.NetWorkListBean, BaseViewHolder> {

    public BuddyListAdapter(List<BuddyBean.NetWorkListBean> data) {
        super(R.layout.item_buddy, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BuddyBean.NetWorkListBean item) {
        helper.setText(R.id.nameTextView, item.getNickName());
        ImageLoaderUtil.display(helper.getView(R.id.portraitImageView), item.getAvatar());
        helper.setVisible(R.id.iv_huang, item.isLeader());
    }
}
